/**
 * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
 */
package com.jeesite.modules.hm.entity;

import javax.validation.constraints.NotBlank;
import org.hibernate.validator.constraints.Length;

import com.jeesite.common.entity.DataEntity;
import com.jeesite.common.mybatis.annotation.Column;
import com.jeesite.common.mybatis.annotation.Table;
import com.jeesite.common.mybatis.mapper.query.QueryType;

/**
 * 贫困户Entity
 * @author wyh
 * @version 2019-01-07
 */
@Table(name="hm_family", alias="a", columns={
		@Column(name="id", attrName="id", label="户籍ID", isPK=true),
		@Column(name="county_code", attrName="countyCode", label="县区CODE"),
		@Column(name="town_code", attrName="townCode", label="所属乡镇"),
		@Column(name="village_code", attrName="villageCode", label="所属村庄"),
		@Column(name="code", attrName="code", label="户编号"),
		@Column(name="person_num", attrName="personNum", label="户人口数"),
		@Column(name="person_id", attrName="personId", label="户主姓名"),
		@Column(name="education_info", attrName="educationInfo", label="是否有在校生", comment="是否有在校生(0：有在校生和失学儿童，1：有在校生，2：有失学儿童，3：无)"),
		@Column(name="destitute_attribute", attrName="destituteAttribute", label="贫困户属性", comment="贫困户属性（0：一般贫困户，1：低保贫困户，2：五保贫困户）"),
		@Column(name="destitute_reason", attrName="destituteReason", label="致贫原因", comment="致贫原因（0：因灾，1：因病，2：因学，3：因残，4：其他）"),
		@Column(name="house_info", attrName="houseInfo", label="是否危房户"),
		@Column(name="condition_id", attrName="conditionId", label="生产生活条件"),
		@Column(name="income_id", attrName="incomeId", label="上半年收入情况"),
		@Column(name="supporter_id", attrName="supporterId", label="帮扶人员"),
		@Column(name="doctor_id", attrName="doctorId", label="签约医生"),
		@Column(includeEntity=DataEntity.class),
	}, orderBy="a.update_date DESC"
)
public class HmFamily extends DataEntity<HmFamily> {
	
	private static final long serialVersionUID = 1L;
	private String countyCode;		// 县区CODE
	private String townCode;		// 所属乡镇
	private String villageCode;		// 所属村庄
	private String code;		// 户编号
	private String personNum;		// 户人口数
	private String personId;		// 户主姓名
	private String educationInfo;		// 是否有在校生(0：有在校生和失学儿童，1：有在校生，2：有失学儿童，3：无)
	private String destituteAttribute;		// 贫困户属性（0：一般贫困户，1：低保贫困户，2：五保贫困户）
	private String destituteReason;		// 致贫原因（0：因灾，1：因病，2：因学，3：因残，4：其他）
	private String houseInfo;		// 是否危房户
	private String conditionId;		// 生产生活条件
	private String incomeId;		// 上半年收入情况
	private String supporterId;		// 帮扶人员
	private String doctorId;		// 签约医生
	
	public HmFamily() {
		this(null);
	}

	public HmFamily(String id){
		super(id);
	}
	
	@NotBlank(message="县区CODE不能为空")
	@Length(min=0, max=64, message="县区CODE长度不能超过 64 个字符")
	public String getCountyCode() {
		return countyCode;
	}

	public void setCountyCode(String countyCode) {
		this.countyCode = countyCode;
	}
	
	@NotBlank(message="所属乡镇不能为空")
	@Length(min=0, max=64, message="所属乡镇长度不能超过 64 个字符")
	public String getTownCode() {
		return townCode;
	}

	public void setTownCode(String townCode) {
		this.townCode = townCode;
	}
	
	@NotBlank(message="所属村庄不能为空")
	@Length(min=0, max=64, message="所属村庄长度不能超过 64 个字符")
	public String getVillageCode() {
		return villageCode;
	}

	public void setVillageCode(String villageCode) {
		this.villageCode = villageCode;
	}
	
	@NotBlank(message="户编号不能为空")
	@Length(min=0, max=64, message="户编号长度不能超过 64 个字符")
	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}
	
	@NotBlank(message="户人口数不能为空")
	@Length(min=0, max=10, message="户人口数长度不能超过 10 个字符")
	public String getPersonNum() {
		return personNum;
	}

	public void setPersonNum(String personNum) {
		this.personNum = personNum;
	}
	
	@NotBlank(message="户主姓名不能为空")
	@Length(min=0, max=64, message="户主姓名长度不能超过 64 个字符")
	public String getPersonId() {
		return personId;
	}

	public void setPersonId(String personId) {
		this.personId = personId;
	}
	
	@Length(min=0, max=1, message="是否有在校生长度不能超过 1 个字符")
	public String getEducationInfo() {
		return educationInfo;
	}

	public void setEducationInfo(String educationInfo) {
		this.educationInfo = educationInfo;
	}
	
	@Length(min=0, max=1, message="贫困户属性长度不能超过 1 个字符")
	public String getDestituteAttribute() {
		return destituteAttribute;
	}

	public void setDestituteAttribute(String destituteAttribute) {
		this.destituteAttribute = destituteAttribute;
	}
	
	@Length(min=0, max=1, message="致贫原因长度不能超过 1 个字符")
	public String getDestituteReason() {
		return destituteReason;
	}

	public void setDestituteReason(String destituteReason) {
		this.destituteReason = destituteReason;
	}
	
	@Length(min=0, max=1, message="是否危房户长度不能超过 1 个字符")
	public String getHouseInfo() {
		return houseInfo;
	}

	public void setHouseInfo(String houseInfo) {
		this.houseInfo = houseInfo;
	}
	
	public String getConditionId() {
		return conditionId;
	}

	public void setConditionId(String conditionId) {
		this.conditionId = conditionId;
	}
	
	public String getIncomeId() {
		return incomeId;
	}

	public void setIncomeId(String incomeId) {
		this.incomeId = incomeId;
	}
	
	@Length(min=0, max=64, message="帮扶人员长度不能超过 64 个字符")
	public String getSupporterId() {
		return supporterId;
	}

	public void setSupporterId(String supporterId) {
		this.supporterId = supporterId;
	}
	
	@Length(min=0, max=64, message="签约医生长度不能超过 64 个字符")
	public String getDoctorId() {
		return doctorId;
	}

	public void setDoctorId(String doctorId) {
		this.doctorId = doctorId;
	}
	
}